import { Component, OnInit } from '@angular/core';
import {SinglePage} from '../../model/SinglePage';

@Component({
  selector: 'app-singlepage',
  templateUrl: './singlepage.component.html',
  styleUrls: ['./singlepage.component.css']
})
export class SinglepageComponent implements OnInit {
  s1:Array<SinglePage>;
  constructor() {
    this.s1=new Array<SinglePage>();
    this.initSinglePage();
  }

  ngOnInit(): void {
  }
  initSinglePage(){
    let one=new SinglePage();
    one.title="卡片1";
    one.content="内容一";
    one.picture="/assets/imgs/sp1.png";
    this.s1.push(one);

    let two=new SinglePage();
    two.title="卡片2";
    two.content="内容二";
    two.picture="/assets/imgs/sp2.png";
    this.s1.push(two);

    let three=new SinglePage();
    three.title="卡片3";
    three.content="内容三";
    three.picture="/assets/imgs/sp3.png";
    this.s1.push(three);
  }

}
